package com.xjgc.eip.twice.zxjeip2cjyny.service.impl;

import javax.servlet.http.HttpServletRequest;

import org.jeecg.common.api.vo.Result;
import org.springframework.stereotype.Service;

import com.baomidou.dynamic.datasource.annotation.DS;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.xjgc.eip.twice.zxjeip2cjyny.entity.ZxjEip2cJyny;
import com.xjgc.eip.twice.zxjeip2cjyny.mapper.ZxjEip2cJynyMapper;
import com.xjgc.eip.twice.zxjeip2cjyny.service.ZxjEip2cJynyService;

/**
 * <p>
 *  服务实现类
 * </p>
 *
 * @author zhanghongbin
 * @since 2019-11-23
 */
@Service
@DS("proxyDs")
public class ZxjEip2cJynyServiceImpl extends ServiceImpl<ZxjEip2cJynyMapper, ZxjEip2cJyny> implements ZxjEip2cJynyService {

    @Override
    public Result<IPage<ZxjEip2cJyny>> queryPageList(ZxjEip2cJyny Jyny, Integer pageNo, Integer pageSize, HttpServletRequest req) {
        Result<IPage<ZxjEip2cJyny>> result = new Result<IPage<ZxjEip2cJyny>>();
        QueryWrapper<ZxjEip2cJyny> queryWrapper = new QueryWrapper<>();
        queryWrapper.setEntity(Jyny);
        /* QueryWrapper<ZxjEip2cJyny> queryWrapper = QueryGenerator.initQueryWrapper(Jyny, req.getParameterMap());*/
        //queryWrapper.eq("\"REVIEW_STATUS\"", Consants.REVIEW_STATUS0);
        Page<ZxjEip2cJyny> page = new Page<ZxjEip2cJyny>(pageNo, pageSize);
        IPage<ZxjEip2cJyny> pageList = super.page(page, queryWrapper);
        result.setSuccess(true);
        result.setResult(pageList);
        return result;
    }
}
